home *** CD-ROM | disk | FTP | other *** search
- /**
- GRAB Graph Layout and Browser System
-
- Copyright (c) 1989, Tera Computer Company
- **/
-
- /* header for executing predicates */
-
- #ifndef pexec_h
- #define pexec_h
-
- #include "attribute.h"
- #include "digraph.h"
-
- typedef char * GELEMENT; /* either an (OUTEDGE *) or a (NODE *) */
-
- typedef struct lelem LELEMENT;
-
- typedef struct lelem /* list of graph elements */
- {
- BOOL node; /* if false, it's an edge */
- GELEMENT gelement; /* the graph element */
- NODE *from; /* head of an outedge
- (if the element is an edge) */
- LELEMENT *next; /* next in the list */
- };
-
- /* shorthand for those tedious conditions which must be checked */
-
- /* if the routine returns no value */
- #define exec_ck \
- if (exec_error || pbroken || pcontinued) return;
-
- /* if the routine returns a boolean */
- #define exec_ckb \
- if (exec_error || pbroken || pcontinued) return FALSE;
-
- /* if the routine returns a pointer */
- #define exec_ckp \
- if (exec_error || pbroken || pcontinued) return NULL;
-
- /**
- step through all nodes, but ignore coalesced nodes, and null nodes,
- and, if ignoreHidden is true, hidden nodes.
- **/
- #define each_pred_node(digraph, node) \
- {\
- VNO _vno;\
- for (_vno = 0; _vno <= digraph->lastnode; _vno++)\
- {\
- node = Node(digraph, _vno); \
- if (node == NULL || Coalesced(node) || \
- (ignoreHidden && !Displayed(node))) \
- continue;
-
- #endif
-